var SearchForm = function () {
  var template = /* html */ `
    <div class="search-form">
      <sys-common-search request-url="materialSelectFilter/getMaterialSelectData" :request-data="{type:4}" :search="search"
        :search-field="searchField" label-width="auto" input-width="180px">
        <template slot="append">
          <el-form-item label="状态">
            <el-select clearable v-model="search.status" style="width:180px">
              <el-option label="使用" :value="1"></el-option>
              <el-option label="禁用" :value="0"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="采购单是否显示金额" label-width="140px">
            <el-select clearable v-model="search.hidePriceForPurchase" style="width:180px">
              <el-option v-for="item in hidePriceList" :key="'hide_'+item.value" :value="item.value" :label="item.label">
              </el-option>
            </el-select>
          </el-form-item>
        </template>
      </sys-common-search>
    </div>
  `;

  return {
    props: {
      search: {
        type: Object,
        required: true
      }
    },

    data: function () {
      return {
        searchField: ['materialName', 'materialType', 'model', 'color', 'colorDescription', 'providerName', 'materialDept',
          'providerNo'
        ],
        hidePriceList: i18n.getDropDown('purchaseOrder.hidePriceForPurchase', [0, 1])
      };
    },

    components: {
      SysCommonSearch: SysCommonSearch
    },

    template: template
  };
}();
